package com.mzy.basics.abstractDemo;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;

/**
 * @author Ives
 * * @date 2021/11/19
 */
public class Test implements interfaceA,interfaceB{
  @Override
  public void eat(String what) {
    System.out.println(what);
  }

  @Override
  public void food(String whatFood) {
    System.out.println(whatFood);
  }


  @org.testng.annotations.Test
  public void demo(){

    apple apple1 = new apple();
    apple1.setName("苹果");


    JSONObject jsonObject = new JSONObject();

    apple apple = jsonObject.toJavaObject(apple.class);


//    Class<apple> appleClass = apple.class;
//    String name = appleClass.getName();
//    System.out.println(name);
    System.out.println(apple.getName());

    this.food("西红柿");
    this.eat("直接吃");
  }
}
